GetThemeMenuBarHeight
NEW WITH THE APPEARANCE MANAGER
Gets the optimal height of a menu bar for the current theme.
pascal OSStatus GetThemeMenuBarHeight (SInt16 *outHeight);
outHeight
- On output, the height (in pixels) of the menu bar.
- function result
- A result code; see "Result Codes".
DISCUSSION
Call theGetThemeMenuBarHeight
function if you are implementing a custom menu bar definition function and want to correctly calculate the height of a menu bar for the current theme.GetThemeMenuBarHeight
will provide the ideal height of a menu bar in the current theme and for this reason should be used instead of theGetMBarHeight
function, which provides only the actual menu bar height.GetMBarHeight
can provide misleading information if, for example, the menu bar is hidden; in that caseGetMBarHeight
would return 0 for the menu bar's height, whileGetThemeMenuBarHeight
would return the preferred height of the menu bar, whether or not it was currently drawn.SPECIAL CONSIDERATIONS
Make sure Appearance Manager 1.0.1 is present before calling theGetThemeMenuBarHeight
function. See "Appearance Manager Gestalt Selector Constants" for details on how to determine if the Appearance Manager is present and what its version is, if so.